package com.freecloud.whispered.auth.service;


import com.freecloud.framework.remotecall.LocalCall;
import com.freecloud.framework.service.InterfaceBaseService;
import com.freecloud.whispered.auth.entity.SysUserEntity;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


/**
 * 系统用户
 * 
 * @author maomao
 * @email 138383877@qq.com
 */
@Service
public interface SysUserService extends InterfaceBaseService<SysUserEntity,Long>,SysUserCall, LocalCall {
	
	/**
	 * 查询用户的所有权限
	 * @param userId  用户ID
	 */
	List<String> queryAllPerms(Long userId);
	
	/**
	 * 查询用户的所有菜单ID
	 */
	List<Long> queryAllMenuId(Long userId);
	
	/**
	 * 根据用户名，查询系统用户
	 */
	SysUserEntity queryByUserName(String username);

	
	/**
	 * 查询用户列表
	 */
	@Override
	List<SysUserEntity> queryList(Map<String, Object> map);

	
	/**
	 * 修改密码
	 * @param userId       用户ID
	 * @param password     原密码
	 * @param newPassword  新密码
	 */
	int updatePassword(Long userId, String password, String newPassword);
}
